import express from 'express';
import authRoutes from './mobile/auth.js';
import domainRoutes from './mobile/domain.js';
import expertRoutes from './mobile/expert.js';
import questionRoutes from './mobile/question.js';
import orderRoutes from './mobile/order.js';
import redeemCodeRoutes from './mobile/redeemCode.js';

const router = express.Router();

// 测试路由（可选，生产环境可移除）
router.get('/test', (_req, res) => {
  res.json({
    code: 200,
    message: '手机端API正常工作',
    data: { timestamp: new Date().toISOString() }
  });
});

// 手机端API路由
router.use('/auth', authRoutes);
router.use('/domains', domainRoutes);
router.use('/experts', expertRoutes);
router.use('/questions', questionRoutes);
router.use('/orders', orderRoutes);
router.use('/redeem-codes', redeemCodeRoutes);

export default router;
